<template>
  <div>

    <input type="text" v-model="count"/>
    <p > {{ count }}</p>
    <p> {{ gender }}</p>
    <ul>
       <!-- <li v-for="(item,index) in list" v-bind:key="index"> {{ item }}</li>
        可以简写为下面的 -->
      <li v-for="(item,index) in list" :key ="index"> 
        {{ item }}  
      </li>
    </ul>
  </div>
</template>
<script setup>
   import {ref} from 'vue'
   let count =ref(0)
   let gender =ref(1)
   if (gender==1){
    gender='男'
   }
   let list=ref(['apple','orange','dog'])
</script>